<?php
/**
 * @desc:
 * wsxc - LinkedShop.php
 * @author: quanjianyu
 * @email: 164174421@qq.com
 * @dateTime：2021/4/8 17:07
 */

namespace wsxc\bean\shop;

class LinkedShop {
    private string $act;
    private string $search_value;
    private int $page_index;
    private string $tag_id;

    /**
     * LinkedShop constructor.
     * @param string $act
     * @param string $search_value
     * @param int $page_index
     * @param string $tag_id
     */
    public function __construct(string $search_value, int $page_index, string $act, string $tag_id) {
        $this->act = $act;
        $this->search_value = $search_value;
        $this->page_index = $page_index;
        $this->tag_id = $tag_id;
    }

    public function toArray() : array {
        $data = [];
        $data['act'] = $this->getAct() ? : 'attention';
        $data['search_value'] = $this->getSearchValue() ? : '';
        $data['page_index'] = $this->getPageIndex() ? : 1;
        $data['tag_id'] = $this->getTagId() ? : '';
        return $data;
    }

    /**
     * @return string
     */
    public function getAct(): string {
        return $this->act;
    }

    /**
     * @param string $act
     */
    public function setAct(string $act): void {
        $this->act = $act;
    }

    /**
     * @return string
     */
    public function getSearchValue(): string {
        return $this->search_value;
    }

    /**
     * @param string $search_value
     */
    public function setSearchValue(string $search_value): void {
        $this->search_value = $search_value;
    }

    /**
     * @return int|string
     */
    public function getPageIndex() {
        return $this->page_index;
    }

    /**
     * @param int|string $page_index
     */
    public function setPageIndex($page_index): void {
        $this->page_index = $page_index;
    }

    /**
     * @return string
     */
    public function getTagId(): string {
        return $this->tag_id;
    }

    /**
     * @param string $tag_id
     */
    public function setTagId(string $tag_id): void {
        $this->tag_id = $tag_id;
    }

}